#ifndef TERMOSTATO_H
#define TERMOSTATO_H

#include <QGraphicsRectItem>
#include <QImage>
#include <QPainter>
#include <QGraphicsProxyWidget>
#include <QLCDNumber>
#include "displayLCD.h"

class Termostato: public QObject, public QGraphicsRectItem
{
    Q_OBJECT
    Q_PROPERTY(qreal scale READ scale WRITE setScale)
public:
    bool visible;
    Termostato();
    void changeStatus();

signals:
    void termostatoClicked();

protected:
    void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);

private:
    QImage *termostato_img, *minimize_icon;
    float itemScale;
    QString *img_path;
    Display *LCD, *LCD2;
    QGraphicsProxyWidget *proxy_LCD, *proxy_LCD2;
    int temperatura, temperatura2;
};

#endif // TERMOSTATO_H
